<include file='Public:header' />
				
				<ul class="breadcrumb breadcrumb-main">
					
					<div class="btn-toolbar">
					
						<a class="btn btn-inverse btn btn-large btn-primary" href="__APP__/caiji/add">添加规则</a>
						<a class="btn btn-cm btn btn-large btn-primary" href="__APP__/caiji/index">所有规则</a>
						

						
					</div>
				</ul>
				
				<!-- post wrapper -->				
				<div class="row-fluid">
				
					
					<div class="span6">
						<div class="well widget">
							<div class="widget-header">
								<h3 class="title">范围采集</h3>
							</div>
							<form action="__APP__/caiji/rangecaiji" method="POST">
								<input type="text" name="startID" value="" placeholder="起始ID">
								<input type="text" name="endID" value="" placeholder="结束ID">
								<input style="margin-bottom:10px;"  type="submit" target="_blank" value="提交采集">
							</form>
						</div>
						<!-- widget -->
						<div class="well widget">
							<!-- widget header -->
							<div class="widget-header">
								<h3 class="title">采集规则列表</h3>
							</div>
							<!-- ./ widget header -->
							
							<!-- widget content -->
							<div class="widget-content">
								<table class="table table-hover">
									<thead>
										<tr>
											<th><input type="checkbox" value="" class="fancy"  id="selectAll" onClick="selectAllCheckBox('product',this.checked)"/>对方ID</th>
											
											<th>小说名称</th>
											<th>小说作者</th>
											<th>最新章节</th>
											<th>小说状态</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="product">
									<volist name='cjinfos' id='cjinfo'>
										<tr>
											<td><input type="checkbox" id="<{$cjinfo.caijiid}>" class="fancy" /><{$cjinfo.caijiid}></td>
											
											<td><{$cjinfo.articlename}></td>
											<td><{$cjinfo.author}></td>
											<td><a href="<{$cjinfo.caijiurl}>" target="_blank"><{$cjinfo.lastchapter}></a></td>
											<td><if condition='$cjinfo.fullflag eq 1'>连载中<else/>已完本</if></td>
											
											<td> <a class="btn btn-small  btn-primary"  href="__URL__/caiji/id/<{$cjinfo.caijiid}>" target="_blank">采集</a>  
											<!--<a class="btn btn-mini   btn-primary"  href="__URL__/del/id/<{$cjinfo.id}>" onclick="return confirm('确定删除小说<{$cjinfo.novelname}>的采集规则<{$cjinfo.caijiname}>吗？')">删除</a> -->
											<!--<a class="btn btn-mini btn-cm   btn-primary"  href="__URL__/tui/id/<{$novel.id}>">查看最新</a> </td>-->
											
										</tr>
									</volist>
										
									</tbody>
								</table>
							</div>
							<!-- ./ widget content -->
						</div>
						<!-- ./ widget -->
						
						
					</div>
				</div>
				
				<div class="btn-toolbar2">
						<!--<a class="btn btn-inverse btn btn-large btn-primary"  onClick="delMany('product')">删除所选规则</a>-->
						
						<a class="btn btn-cm btn btn-large btn-primary"  onClick="addMany('product')">采集所选规则</a>
						
						<a class="btn btn-inverse btn btn-large btn-primary" href="__APP__/Caiji/allcaiji">采集网站全部小说</a>
						<div style="margin-right:20px;float:right"><{$pageshow}></div>
					
				</div>
				
				
				<!-- ./ post wrapper -->
			</div>
			<!-- end main content -->	
	<script type="text/javascript" language="javascript">
		function addMany(ParentID){
			if(confirm('确定要采集所选小说规则吗？')){
				var pID=document.getElementById(ParentID);
				var cb=pID.getElementsByTagName('input');
				var span=pID.getElementsByTagName('span');
				get='';
				for(var i=0;i<span.length;i++){
					if(span[i].className == 'checked'){
							get=get+cb[i].id+',';
					}
					console.log(get);
					
					window.location="__APP__/Caiji/manycaiji/id/"+get; 
				}
			}
		}
		
		function delMany(ParentID){
			if(confirm('确定要删除所选小说规则吗？')){
				var pID=document.getElementById(ParentID);
				var cb=pID.getElementsByTagName('input');
				var span=pID.getElementsByTagName('span');
				get='';
				for(var i=0;i<span.length;i++){
					if(span[i].className == 'checked'){
							get=get+cb[i].id+',';
					}
					window.location="__APP__/Caiji/delMany/id/"+get; 
				}
			}
		}
		function selectAllCheckBox(ParentID,bool){
			var pID=document.getElementById(ParentID);
			var cb=pID.getElementsByTagName('span');
			if(bool){
				for(var i=0;i<cb.length;i++){
					cb[i].className="checked";
				}
			}else{
				for(var i=0;i<cb.length;i++){
					cb[i].className="";
				}
			}
		}
		
	</script>
	
<include file='Public:footer' />